import request from '@/utils/request'

// 巡更点列表
export function pointPositionList(data) {
  return request({
    url: 'v1/patrol-points/index',
    method: 'get',
    params: {
      ...data
    }
  })
}

// 添加巡更点
export function pointPositionAdd(data) {
  return request({
    url: 'v1/patrol-points/create',
    method: 'post',
    data: {
      ...data
    }
  })
}
// 修改巡更点
export function pointPositionUpdate(data) {
  return request({
    url: 'v1/patrol-points/update',
    method: 'post',
    params: {
      point_id: data.point_id
    },
    data: data
  })
}

// 导入巡更点
export function pointPositionImport(data) {
  return request({
    url: 'v1/patrol-points/import',
    method: 'post',
    data: {
      ...data
    }
  })
}
